
-- --------------------------------------------------
-- Entity Designer DDL Script for SQL Server 2005, 2008, and Azure
-- --------------------------------------------------
-- Date Created: 03/10/2013 23:59:54
-- Generated from EDMX file: C:\Users\it007\Desktop\MyNang\My\QSchedule\Mapping.Cons\MappingModel.edmx
-- --------------------------------------------------

SET QUOTED_IDENTIFIER OFF;
GO
USE [QSchedule_Mapping];
GO
IF SCHEMA_ID(N'dbo') IS NULL EXECUTE(N'CREATE SCHEMA [dbo]');
GO

-- --------------------------------------------------
-- Dropping existing FOREIGN KEY constraints
-- --------------------------------------------------


-- --------------------------------------------------
-- Dropping existing tables
-- --------------------------------------------------


-- --------------------------------------------------
-- Creating all tables
-- --------------------------------------------------

-- Creating table 'Map_Locations'
CREATE TABLE [dbo].[Map_Locations] (
    [Map_LocationID] int IDENTITY(1,1) NOT NULL,
    [Location] nvarchar(max)  NOT NULL,
    [LocationID] int  NOT NULL
);
GO

-- Creating table 'Map_Physicians'
CREATE TABLE [dbo].[Map_Physicians] (
    [Map_PhysicianID] int IDENTITY(1,1) NOT NULL,
    [Physician] nvarchar(max)  NOT NULL,
    [PhysicianCode] nvarchar(5)  NOT NULL
);
GO

-- --------------------------------------------------
-- Creating all PRIMARY KEY constraints
-- --------------------------------------------------

-- Creating primary key on [Map_LocationID] in table 'Map_Locations'
ALTER TABLE [dbo].[Map_Locations]
ADD CONSTRAINT [PK_Map_Locations]
    PRIMARY KEY CLUSTERED ([Map_LocationID] ASC);
GO

-- Creating primary key on [Map_PhysicianID] in table 'Map_Physicians'
ALTER TABLE [dbo].[Map_Physicians]
ADD CONSTRAINT [PK_Map_Physicians]
    PRIMARY KEY CLUSTERED ([Map_PhysicianID] ASC);
GO

-- --------------------------------------------------
-- Creating all FOREIGN KEY constraints
-- --------------------------------------------------

-- --------------------------------------------------
-- Script has ended
-- --------------------------------------------------